/**
 * Copyright (c) Software Institute of PKU
 * All rights reserved. 
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 */
package edu.pku.sei.modeler.uml;

import org.eclipse.gef.EditPart;

import edu.pku.sei.modeler.edit.parts.AbstractTreeEditPartFactory;
import edu.pku.sei.modeler.model.core.MetaElement;
import edu.pku.sei.modeler.model.structure.MetaShapeElement;
import edu.pku.sei.modeler.model.uml.*;

import edu.pku.sei.modeler.model.uml.Dependencies.*;
import edu.pku.sei.modeler.model.uml.PowerTypes.*;
import edu.pku.sei.modeler.model.uml.Interfaces.*;
import edu.pku.sei.modeler.model.uml.BasicInteractions.*;
import edu.pku.sei.modeler.model.uml.BasicBehaviors.*;
import edu.pku.sei.modeler.model.uml.Communications.*;
import edu.pku.sei.modeler.model.uml.Fragments.*;
import edu.pku.sei.modeler.model.uml.IntermediateActions.*;
import edu.pku.sei.modeler.model.uml.CompleteActions.*;
import edu.pku.sei.modeler.model.uml.FundamentalActivities.*;
import edu.pku.sei.modeler.model.uml.BasicActivities.*;
import edu.pku.sei.modeler.model.uml.IntermediateActivities.*;
import edu.pku.sei.modeler.model.uml.Kernel.*;
import edu.pku.sei.modeler.model.uml.CompleteActivities.*;
import edu.pku.sei.modeler.model.uml.StructuredActivities.*;
import edu.pku.sei.modeler.model.uml.UseCases.*;

import edu.pku.sei.modeler.model.uml.ExtraStructuredActivities.*;
import edu.pku.sei.modeler.model.uml.BasicActions.*;
import edu.pku.sei.modeler.model.uml.BehaviorStateMachines.*;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ActionTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ActivityFinalNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ActivityTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ActorTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.AssociationTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.CombinedFragmentTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ControlFlowTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.DataStoreNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.DecisionNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.DependencyTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ExpansionRegionTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ExtendTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ForkNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.GeneralOrderingTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.GeneralizationTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.IncludeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.InitialNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.InstanceSpecificationTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.InteractionTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.InterfaceRealizationTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.InterfaceTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.JoinNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.LifelineTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.MergeNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.MessageTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ObjectFlowTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.ObjectNodeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.PackageImportTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.PackageMergeTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.RealizationTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.StateInvariantTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.UMLClassTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.UMLPackageTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.UsageTreeEditpart;
import edu.pku.sei.modeler.uml.obsolete.fromeditpart.UseCaseTreeEditpart;

/**
 * @generated
 *
 */
public class UMLModelTreeEditpartFactory extends AbstractTreeEditPartFactory{
    public EditPart createEditPart(MetaShapeElement shape)
	{
		EditPart part = null;
		MetaElement content = shape.getModelElement();
		if (false){
			part = null;
		}
		
		else if(content instanceof Interaction) {
			part = new InteractionTreeEditpart(shape);
		}
		
		else if(content instanceof UMLClass) {
			part = new UMLClassTreeEditpart(shape);
		}
		
//		else if(content instanceof InteractionOccurrence) {
//			part = new InteractionOccurrenceTreeEditpart(shape);
//		}
		
		else if(content instanceof ExpansionRegion) {
			part = new ExpansionRegionTreeEditpart(shape);
		}
		
		else if(content instanceof DataStoreNode) {
			part = new DataStoreNodeTreeEditpart(shape);
		}
		
		else if(content instanceof DecisionNode) {
			part = new DecisionNodeTreeEditpart(shape);
		}
		
		else if(content instanceof MergeNode) {
			part = new MergeNodeTreeEditpart(shape);
		}
		
		else if(content instanceof JoinNode) {
			part = new JoinNodeTreeEditpart(shape);
		}
		
		else if(content instanceof ForkNode) {
			part = new ForkNodeTreeEditpart(shape);
		}
		
		else if(content instanceof InitialNode) {
			part = new InitialNodeTreeEditpart(shape);
		}
		
		else if(content instanceof ActivityFinalNode) {
			part = new ActivityFinalNodeTreeEditpart(shape);
		}
		
		else if(content instanceof ObjectNode) {
			part = new ObjectNodeTreeEditpart(shape);
		}
		
		else if(content instanceof Action) {
			part = new ActionTreeEditpart(shape);
		}
		
		else if(content instanceof Activity) {
			part = new ActivityTreeEditpart(shape);
		}
		
		else if(content instanceof CombinedFragment) {
			part = new CombinedFragmentTreeEditpart(shape);
		}
		
		else if(content instanceof Actor) {
			part = new ActorTreeEditpart(shape);
		}
		
		else if(content instanceof UseCase) {
			part = new UseCaseTreeEditpart(shape);
		}
		
		else if(content instanceof Interface) {
			part = new InterfaceTreeEditpart(shape);
		}
		
		else if(content instanceof InstanceSpecification) {
			part = new InstanceSpecificationTreeEditpart(shape);
		}
		
		else if(content instanceof Lifeline) {
			part = new LifelineTreeEditpart(shape);
		}
		
		else if(content instanceof UMLPackage) {
			part = new UMLPackageTreeEditpart(shape);
		}
		
		else if(content instanceof StateInvariant) {
			part = new StateInvariantTreeEditpart(shape);
		}
		
		else if(content instanceof Association) {
			part = new AssociationTreeEditpart(shape);
		}
		
		else if(content instanceof ObjectFlow) {
			part = new ObjectFlowTreeEditpart(shape);
		}
		
		else if(content instanceof ControlFlow) {
			part = new ControlFlowTreeEditpart(shape);
		}
		
		else if(content instanceof Include) {
			part = new IncludeTreeEditpart(shape);
		}
		
		else if(content instanceof Extend) {
			part = new ExtendTreeEditpart(shape);
		}
		
		else if(content instanceof GeneralOrdering) {
			part = new GeneralOrderingTreeEditpart(shape);
		}
		
		else if(content instanceof Generalization) {
			part = new GeneralizationTreeEditpart(shape);
		}
		
		else if(content instanceof Message) {
			part = new MessageTreeEditpart(shape);
		}
		
		else if(content instanceof InterfaceRealization) {
			part = new InterfaceRealizationTreeEditpart(shape);
		}
		
		else if(content instanceof Realization) {
			part = new RealizationTreeEditpart(shape);
		}
		
		else if(content instanceof Usage) {
			part = new UsageTreeEditpart(shape);
		}
		
		else if(content instanceof Dependency) {
			part = new DependencyTreeEditpart(shape);
		}
		
		else if(content instanceof PackageImport) {
			part = new PackageImportTreeEditpart(shape);
		}
		
		else if(content instanceof PackageMerge) {
			part = new PackageMergeTreeEditpart(shape);
		}
		
		else {
			part = super.createEditPart(shape);
		}
		return part;
	}
}